package com.tao.enums;

public enum AppHttpCodeEnum {
    //成功
    SUCCESS(200,"操作成功"),
    BAD_REQUEST(400,"请求参数异常"),
    FILE_TYPE_ERROR(507,"文件类型错误"),
    // 登录
    NEED_LOGIN(401,"需要登录后操作"),
    FAILURE(402,"操作失败"),
    NO_OPERATOR_AUTH(403,"无权限操作"),
    SYSTEM_ERROR(500,"出现错误"),
    USERNAME_EXIST(400,"用户名已存在"),
    REQUIRE_USERNAME(400,"用户名不能为空"),
    LOGIN_ERROR(505,"用户名或密码错误");
    int code;
    String msg;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.msg = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
